//
//  BNDOfficeDocSearchTipView.m
//  OfficeDoc
//
//  Created by pie on 2022/4/1.
//  Copyright © 2022 pie. All rights reserved.
//

#import "BNDOfficeDocSearchTipView.h"
#import "BNDOfficeDocKit.h"

@interface BNDOfficeDocSearchTipView ()
@property (copy, nonatomic) UILabel *titleLabel;
@end

@implementation BNDOfficeDocSearchTipView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = UIColor.whiteColor;
        
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.font = BNDPFHeavyFont(14);
        _titleLabel.textColor = UIColorWithHex(0x51555D);
        _titleLabel.text = @"搜到相关结果 0";
        _titleLabel.numberOfLines = 1;
        [self addSubview:_titleLabel];
        [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.mas_left).offset(16);
            make.height.mas_equalTo(20);
            make.bottom.mas_equalTo(self.mas_bottom).offset(-16);
        }];
    }
    return self;
}

- (void)setSearchCountText:(NSString *)searchCountText
{
    _searchCountText = searchCountText;
    _titleLabel.text = [NSString stringWithFormat:@"搜到相关结果 %@",searchCountText];
}
@end
